package com.taobao.pet.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.taobao.org.domain.Shop;
import com.taobao.user.domain.User;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Pet {
    // 编号
    private Long id;
    // 名称
    private String name;
    // 成本价格
    private BigDecimal costprice;
    // 销售价格
    private BigDecimal saleprice;

    // 类型-id
    private Long type_id;
    private PetType type;

    // 资源-放图片的地方
    private String resources;
    // 状态
    private Integer state = 0;

    // 下架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    private Date offsaletime;
    // 上架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    private Date onsaletime;
    // 录入时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    private Date createtime = new Date();

    // 店铺-id
    private Long shop_id;
    private Shop shop;
    // 用户-id
    private Long user_id;
    private User user;

    // 宠物来源-寻主的id
    private Long search_master_msg_id;

    // 接收前端的数据
    private PetDetail petDetail;
}
